import { Component, OnInit, Input, ViewChild } from '@angular/core';
import { NgbActiveModal } from '@ng-bootstrap/ng-bootstrap';
import { BasicService } from '../../../../@core/data/basic.service';
import { ServerDataSource } from 'ng2-smart-table';
// 消息提醒
import { ToasterConfig } from 'angular2-toaster';
import { NotificationsService } from '../../../../@core/utils/notifications.service';
@Component({
  selector: 'ngx-hispaper-modal',
  templateUrl: './hispaper.modal.component.html',
})
export class HisPaperModalComponent implements OnInit {

  @Input() modalHeader: string;

  @Input() achievement: any;

  description: any;

  rightIon = 'ion-checkmark-round';
  wrongIon = 'ion-close-round';

  constructor(private activeModal: NgbActiveModal, private basicService: BasicService,
    private notificationsService: NotificationsService) {
  }

  ngOnInit() {
    if (this.achievement) {
      this.description = this.achievement.description;
      if ((typeof this.description) === 'string') {
        this.description = JSON.parse(this.description);
      }
    }
  }

  // 取消
  closeModal() {
    this.activeModal.close();
  }
}
